import http from './http'

export const doctorLogin = (data) => http.post('/doctors/login', data)
export const updateDoctor = (doctorId, data) => http.put(`/doctors/${doctorId}`, data)

export const getDoctorSchedules = (doctorId, params) => http.get(`/doctors/${doctorId}/schedules`, { params })
export const getDoctorOrders = (doctorId, params) => http.get(`/doctors/${doctorId}/orders`, { params })

// 更新标本状态（采集成功/失败等）
export const doctorUpdateSampleStatus = (sampleId, params) => http.put(`/doctors/samples/${sampleId}/status`, null, { params })

// 指标结果录入与异常标注
export const doctorCreateIndicatorResult = (data) => http.post('/doctors/indicator-results', data)
export const doctorUpdateIndicatorAbnormal = (resultId, params) => http.put(`/doctors/indicator-results/${resultId}/abnormal`, null, { params })